package com.bigflexlib.ds.container.zet.impl
{
		
	import com.bigflexlib.ds.container.impl.AbstractOWContainerWrapper;
	import com.bigflexlib.ds.container.zet.IOWSet;
	import com.bigflexlib.ds.container.zet.IRWSet;


	public class OWSetWrapper extends AbstractOWContainerWrapper implements IOWSet
	{
		
		
		
		private var internalSet:IRWSet;
		
		
		
		public function OWSetWrapper( internalSet:IRWSet )
		{
			super( internalSet );
			this.internalSet = internalSet;
		}
		
		
		
		public function add( e:* ):void
		{
			
			var m:int = internalSet.getMultiplicity( e );
			
			if ( m == 0 )
			{

				if ( someoneIsWatching )
				{
					beforeChange( e, m );				
					internalSet.add( e );
					afterChange( e, m + 1 );
				}
				else
				{
					internalSet.add( e );
				}
				
			}

		}		
		

		
	}
	
}